<?php
include ("konek.php");
	$nama=$_POST['nama'];
	$username=$_POST['username'];
	$pass=$_POST['password'];
	$email=$_POST['email'];
	$telpon=$_POST['telpon'];
	$alamat=$_POST['alamat'];
	$deskripsi=$_POST['deskripsi'];

	$cek_username=mysql_num_rows(mysql_query("select username from account_technopreneur where username='$username'"));
	
if ($cek_username > 0){
	header('location:view/daftar.php?message=warning');
	}
	else {
	mysql_query("insert into account_technopreneur values('','$username','$pass','$email','$nama','$telpon','$alamat','$deskripsi',now())") or die (mysql_error());
	header('location:view/login.php?message=success');
	}
?>